package vip.xiaonuo.device.modular.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.device.modular.service.DeviceApiService;
import vip.xiaonuo.device.vo.Result;

import javax.annotation.Resource;

@Slf4j
@Api(tags = "物品柜绑定控制器")
@ApiSupport(author = "SNOWY_TEAM", order = 1)
@RestController
@Validated
public class DeviceBindingController {
    @Resource(name = "deviceBindingService")
    private DeviceApiService deviceBindingService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("物品柜绑定")
    @PostMapping("/api/client/binding")
    public Result binding(@RequestBody String params) {
        return deviceBindingService.execute(params);
    }
}
